# -*- coding: utf-8 -*-

# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html

import scrapy


class BossItem(scrapy.Item):
    url = scrapy.Field()  # 地址
    jname = scrapy.Field() # 工作名字
    jmoney = scrapy.Field() # 工资
    area = scrapy.Field() # 地址
    experience = scrapy.Field() #经验
    education = scrapy.Field() # 学历
    demand = scrapy.Field() # 需求
    company = scrapy.Field() # 公司名称
    frequency = scrapy.Field() # 轮数
    numbers = scrapy.Field() # 招聘人数
    industry = scrapy.Field() # 行业
    recruiters = scrapy.Field() # 招聘者
    detail = scrapy.Field() # 详情

    def get_sql(self):
        sql = 'insert into bosszhipin(url,jname,jmoney,area,experience,education,demand,company,frequency,numbers,industry,recruiters,detail,refer) values(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)'
        data = (self["url"],self["jname"],self["jmoney"],self["area"],self["experience"],self["education"],self["demand"],self["company"],self["frequency"],self["numbers"],self["industry"],self["recruiters"],self["detail"],"boss直聘")
        return sql,data




